package com.xls.box2023.adapter;

import android.content.Context;
import android.view.ViewGroup;

import androidx.annotation.NonNull;

import com.lzz.bottomencapsulation.adapter.MvpBaseRecyclerAdapter;
import com.xls.box2023.entity.YouXiXiaoHaoJinBiEntity;

import java.util.ArrayList;
import java.util.List;

public class YouXiXiaoHaoJinBiListAdapter extends MvpBaseRecyclerAdapter<YouXiXiaoHaoJinBiViewHolder> {
    ArrayList<YouXiXiaoHaoJinBiEntity> datalist=null;
    public YouXiXiaoHaoJinBiListAdapter(Context context,ArrayList<YouXiXiaoHaoJinBiEntity> datalist) {
        super(context);
        this.datalist=datalist;
    }

    @Override
    public void onBindView(@NonNull YouXiXiaoHaoJinBiViewHolder holder, int position) {
        holder.setViewData(datalist.get(position));
        holder.initView();
    }

    @Override
    public void onBindView(YouXiXiaoHaoJinBiViewHolder holder, int position, List<Object> payloads) {

    }

    @NonNull
    @Override
    public YouXiXiaoHaoJinBiViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new YouXiXiaoHaoJinBiViewHolder(context,parent);
    }

    @Override
    public int getItemCount() {
        return datalist.size();
    }
}
